package com.common.utils;

import com.common.constant.SnatchConstant;

public class CacheUtil {
	/**
	 * 共公增量版本key
	 * @param itemOnlyCode
	 * @return
	 */
	public static String getVersionKey(String itemOnlyCode){
		return itemOnlyCode+"*"+SnatchConstant.VERSIONSKEY;
	}
	
	/**
	 * 总策略key
	 * @param nodeOnlyCode
	 * @param itemOnlyCode
	 * @return
	 */
	public static String getSnatchTactKey(String nodeOnlyCode,String itemOnlyCode){
		return nodeOnlyCode+"*"+itemOnlyCode+"*"+SnatchConstant.TACTKEY;
	}
	
	/**
	 * 
	 * @param itemOnlyCode
	 * @param page
	 * @return
	 */
	public static String getSnatchDataKey(String nodeOnlyCode,String itemOnlyCode,int page){
		return nodeOnlyCode+"*"+itemOnlyCode+"*"+SnatchConstant.SNATCHDATAKEY+"*"+page;
	}
	
	
}
